pp108 : Building a Rule on WS-AppServer Models

Building a Rule on WS-AppServer Models

This topic describes the procedure to build a Rule on WS-AppServer models.

Before you begin this task:
WS-AppServer Package should contain data models. In order to build a rule, you must ensure that the Enable Rules option is selected in WS-AppServer tab of WS-AppServer Service Container.

The default business logic embedded in the Java code and Web service operations generated by WS-AppServer are static in nature. However, they can be customized to embed dynamic business logic that would help address complex computations and requirements of a dynamic business environment. You can achieve this by defining rules in a WS-AppServer application.
WS-AppServer provides a facility to build rules on its data models and leverage the dynamic business logic building facility provided by the Rule Engine. By applying rules, you extend the available business logic, and enable the application to perform complex tasks. Once you define a rule on a WS-AppServer model, it will be executed during runtime, while running the corresponding Web service operation.

  1. Double-click the <WS-AppServer Package> from either of the following locations:
    • Workspace Documents (My Recent Documents) window.
    • Workspace Documents (Explorer) > <solution> > <project> . The WS-AppServer Package window appears, displaying all the models.
  2. In WS-AppServer Package, right-click a model and select Create Rule from the menu. The Rule editor appears.
  3. Build the rule as described in the procedure Creating a Business Rule.
    The rule is created on the WS-AppServer Model and is now a part of the WS-AppServer application. It is triggered during runtime when the Web service operations from this application are executed.

    After you complete this task:
    Publish the WS-AppServer package and the Web service operations generated on it to run-time.